#include <functional>
#include <memory>
#include <thread>
#include "rclcpp/rclcpp.hpp"

class TestYaml : public rclcpp::Node
{
private:

    int speed_min;
    int min;

    rclcpp::TimerBase::SharedPtr timer_;

public:
    TestYaml();
    ~TestYaml();

    void get_yaml()
    {
        this->timer_->cancel();

        this->get_parameter("Speed_Min", speed_min);
        this->get_parameter("Speed.Min", min);

        RCLCPP_INFO(this->get_logger(), "speed_min is %d, speed.min is %d", speed_min, min);
    }
};

TestYaml::TestYaml() : Node("test_yaml")
{
    this->declare_parameter<int>("Speed_Min", 200);
    this->declare_parameter<int>("Speed.Min", 200);

    this->timer_ = this->create_wall_timer(std::chrono::milliseconds(500), std::bind(&TestYaml::get_yaml, this));
}

TestYaml::~TestYaml()
{
}